<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>练习3:加载状态管理</title>
    <script src="../../js/"></script>
</head>
<body>
    <div id="app">
        <p v-show = 'show'>正在加载数据...</p>
        <p v-show = 'showWancheng'>数据加载完成</p>
        <p v-show = 'showNeilong'>--&gt这是用户数据&lt--</p>
        <button @click = 'diaoyong'>调用</button>
    </div>
</body>
</html>

<script>
    var app = new Vue({
        el: '#app',
        data: {
            show: false,
            showWancheng: false,
            showNeilong: false
        },
        methods: {
            diaoyong: function () {
                this.show = true
                setTimeout(() => {
                    this.show = false
                    this.showWancheng = true
                    this.showNeilong = true
                }, 2000);
            }
        }
    })

</script>